{% extends "base.html" %}
{# vim: set sw=2 ts=2 expandtab: #}

{% block head %}
<title>XParty - Teacher Dashboard</title>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/js/activity.js?version=072512"></script>
<script type="text/javascript">
// <![CDATA[ 
  var DEBUG = {{ debug }}; 
  {{ None|init_activity_types_js }}
  {{ activities|init_activities_js }}
   
  $(document).ready(function() {  
    updateUI();
  });

  function updateUI() {
    var hash = window.location.hash;
    if (hash != '') {
      var tokens = hash.split(':');
      var activity_code = tokens[0].substring(1);
      goToActivityForm(activity_code);
    }
    else {
      goToTeacherDashboard(undefined, false); 
    }
  }
// ]]>
</script>
{% endblock %}

{% block body %}
<div class="container_16 cntrmain">
    <div class="grid_16 branding">
        {% include "header.html" %}
        <div class="clear"></div>
    </div>
</div>

<div class="container_16 cntrbody">
    <div class="grid_16">
        <div class="grid_5">
            <div id="side_button_bar">
                <button class="cssbtn" id="create_activity_btn" onclick="goToActivityForm('');">Create Activity</button><br/>
                <button class="cssbtn" id="stop_activities_btn" onclick="stopAllActivities(); return false;">Stop All Activities</button><br/>
                <button class="cssbtn" id="delete_activities_btn" onclick="deleteAllActivities(); return false;">Delete All Activities</button><br/>
            </div>
        </div><!-- end grid_5 -->
        <div class="grid_11">
            <div id="data_container">
                <header class="info">
                    <span id="content_title" class="h2"></span>
                    <span id="activity_filter" style="margin-left:5px"></span>
                </header>
                <div id="error" style="color:red; margin:10px 5px 5px 5px; display:none"></div>
                <div id="content"></div>
            </div>
        </div><!-- end grid_11 -->
    </div>
</div>
{% endblock %}
